﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

namespace WebApplication11.Models
{
    public class Books
    {
        [Required]
        [Display(Name = "Cover Image Url")]
        public string ImgUrl { get; set; }
        [Required]
        public string Author { get; set; }
        [Required]
        public string Title { get; set; }
        [Required]
        public string Summary { get; set; }
        [Required]
        public string Genre { get; set; }
        [Required]
        [Display(Name = "Publication Date")]
        public DateTime PubDate { get; set; }

        public enum Html5DateRenderingMode
        {
            CurrentCulture = 0,
            Rfc3339
        }

        [Required]
        public Rating Rating { get; set; }
        [Required]
        [Range(0, 999999999999)]
        public long Id { get; set; }
    }

    public enum Rating
    {
        one_star = 1,
        two_stars = 2,
        three_stars = 3,
        four_stars = 4,
        five_stars = 5,
    }
}